using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Data;
using EntityLayer;
using System.Collections;
using InfraStructureLayer;

namespace WebControls
{
    public class SFMasterPage : MasterPage
    {
        public int PageId
        {
            get
            {
                if (ViewState["PageId"] == null)
                {
                    ViewState["PageId"] = Convert.ToInt32(CurrentContext.Pages.Select("PageClassName='" + this.GetType().ToString() + "'")[0]["PageId"]);
                }
                return Convert.ToInt32(ViewState["PageId"]);
            }
        }
        private DataTable _Multilanguage;
        public DataTable Multilanguage
        {
            get
            {
                if (_Multilanguage == null)
                {
                    entMultilanguageSettings insEntMultilanguage = new entMultilanguageSettings();
                    insEntMultilanguage.PageId = this.PageId;
                    insEntMultilanguage.LanguageId = CurrentContext.LanguageId.Value;
                    this._Multilanguage = (DataTable)CurrentContext.Multilanguage[insEntMultilanguage.ToString()];
                }
                return _Multilanguage;
            }
        }
        protected override void OnLoad(EventArgs e)
        {

            base.OnLoad(e);
        }

        public void MessageBoxShow(string message)
        {
            ((SFLabel)this.FindControl("lblErrorMessage")).Text = message + "<br>";
            //((ModalPopupExtender)this.FindControl("ModalPopupExtenderError")).Show();
        }

      
    }
}

